package com.sg.business.commons.labelprovider.work;

import com.sg.business.model.Work;
import com.sg.widgets.commons.labelprovider.CommonHTMLLabel;
import com.sg.widgets.commons.labelprovider.HTMLAdvanceLabelProvider;
import com.sg.widgets.part.CurrentAccountContext;

public class WorkOrWBSLabelprovider extends HTMLAdvanceLabelProvider {
	
	@Override
	public String getText(Object element) {
		if (element instanceof Work) {
			Work work = (Work) element;
			CommonHTMLLabel adapter = work.getAdapter(CommonHTMLLabel.class);
			adapter.setContext(new CurrentAccountContext());
			adapter.setConfigurator(configurator);
			adapter.setKey("open");
			return adapter.getHTML();
		}
		return super.getText(element);
	}

}
